<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <title>layui在线调试</title>
    <link rel="stylesheet" th:href="@{/webjars/layui/2.5.4/css/layui.css}" href="//res.layui.com/layui/dist/css/layui.css?t=1568076536509" media="all">
    <link rel="stylesheet" type="text/css" th:href="@{/css2/H-ui.admin.css}" />
    <link rel="stylesheet" type="text/css" th:href="@{/css2/H-ui.min.css}" />
    <link rel="stylesheet" type="text/css" th:href="@{/css2/iconfont.css}" />
    <link rel="stylesheet" type="text/css" th:href="@{/css2/skin.css}" id="skin" />
    <link rel="stylesheet" type="text/css" th:href="@{/css2/jquery.contextMenu.css}" />
    <link rel="stylesheet" type="text/css" th:href="@{/css2/style.css}"/>

    <link rel="stylesheet" type="text/css" href="static/h-ui/css/H-ui.min.css" />
    <link rel="stylesheet" type="text/css" href="static/h-ui.admin/css/H-ui.admin.css" />
    <link rel="stylesheet" type="text/css" href="lib/Hui-iconfont/1.0.8/iconfont.css" />
    <link rel="stylesheet" type="text/css" href="static/h-ui.admin/skin/default/skin.css" id="skins" />
    <link rel="stylesheet" type="text/css" href="static/h-ui.admin/css/style.css" />

</head>
<body>
<div class="page-container">
    <div class="cl pd-5 bg-1 bk-gray mt-20">
        <!-- <span>
             &lt;!&ndash;<a href="javascript:;" onclick="member_add('添加','/carseat','','510')" class="btn btn-primary radius"><i class="Hui-iconfont">&#xe600;</i> 添加</a>&ndash;&gt;
             <a href="/carseat" class="btn btn-primary radius"><i class="Hui-iconfont">&#xe600;</i>添加</a>
         </span>-->

    </div>
    <div class="mt-20">
        <table id = "tbo" class="table table-border table-bordered table-hover table-bg table-sort">
            <thead>
            <tr class="text-c">
                <th width="60">ID</th>
                <th width="50">车位编号</th>
                <th width="80">起始时间</th>
                <th width="80">结束时间</th>
                <th width="80">单价</th>
                <th width="80">费用金额</th>
                <th width="80">记录人</th>
                <th width="80">操作</th>
            </tr>
            </thead>
            <tbody>
            <tr class="text-c" th:each="obj:${parkings}">
                <!--<td><input name="subBox"  type="checkbox" th:value="${obj.cs_id}"></td>-->
                <td th:text="${obj.p_id}">id</td>
                <td th:text="${obj.cs_id}">车位编号</td>
                <td th:text="${#dates.format(obj.p_satrDate,'yyyy-MM-dd')}">起始时间</td>
                <td th:text="${#dates.format(obj.p_endDate,'yyyy-MM-dd')}">结束时间</td>
                <td th:text="${obj.p_unit }">单价</td>
                <td th:text="${obj.p_price}">费用金额</td>
                <td th:text="${obj.p_name}">记录人</td>
                <th class="f-14 product-band-manage">
                    <a title="添加费用" href="/carseat"><i class="Hui-iconfont">&#xe600;</i></a>
                </th>
            </tr>
            </tbody>

        </table>
    </div>
</div>
<script type="text/javascript" src="lib/My97DatePicker/4.8/WdatePicker.js"></script>
<script type="text/javascript" src="lib/datatables/1.10.0/jquery.dataTables.min.js"></script>
<script type="text/javascript" src="lib/laypage/1.2/laypage.js"></script>
<script type="text/javascript" src="lib/jquery/1.9.1/jquery.min.js"></script>
<script type="text/javascript" src="lib/layer/2.4/layer.js"></script>
<script type="text/javascript" src="static/h-ui/js/H-ui.min.js"></script>
<script type="text/javascript" src="static/h-ui.admin/js/H-ui.admin.js"></script>

<script th:src="@{/webjars/jquery/2.1.1/jquery.js}"></script>
<script th:src="@{/js2/jquery.dataTables.min.js}"></script>
<script>
    $(document).ready(function(){
        $(function(){
            $('#tbo').DataTable({
                "aLengthMenu":[5,8,10]
                /*
                * "aaSorting": [
                    [ 1, "desc" ]
                ]//默认第几个排序
                * */
            });
        });
    });
    function hh(obj) {
        var p_id=$(obj).attr("id");
        var arr=new Array();
        arr=p_id.split(',');
        var a=arr[0];
        var b=arr[1];
        /*alert(a);
        alert(b);
*/
        if(p_state!=1){
            alert("该用户已支付")
        }else {
            $.ajax({
                url:"upParking",
                data:{"p_state":p_state},
                type:"post",
                dataType:"text",
                success:function (data) {

                }
            });
        }

    }
</script>
<script type="text/javascript">
    /*用户-添加*/
    function member_add(title,url,w,h){
        layer_show(title,url,w,h);
    }
    /*用户-编辑*/
    function member_edit(title,url,id,w,h){
        layer_show(title,url,w,h);
    }
</script>
</body>
</html>